<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>post</title>
</head>

<body>
    <script src="../src/ajax.js"></script>
    <script>
        Ajax({
            method: 'post',
            url: '/base/post',
            data: {
                a: 1,
                b: 2
            }
        })

        Ajax({
            method: 'post',
            url: '/base/post',
            headers: {
                'content-type': 'application/json;charset=utf-8'
            },
            data: {
                a: 1,
                b: 2
            }
        })

        // 包含现代游览器api，不适合低版本ie测试
        // const arr = new Int32Array([21, 31])

        // Ajax({
        //     method: 'post',
        //     url: '/base/buffer',
        //     data: arr
        // })


        // const paramsString = 'q=URLUtils.searchParams&topic=api'
        // const searchParams = new URLSearchParams(paramsString)

        // Ajax({
        //     method: 'post',
        //     url: '/base/post',
        //     data: searchParams
        // })
    </script>
</body>

</html>